public interface CollAServer
| Modifier and Type | Method and Description |
|---|---|
void |
disconnectAllClients()
Changes the status of every client to offline.
|
long |
generateSessionID()
Generates an ID to identify an user session
|
java.util.Set<java.lang.String> |
getAllGroups() |
CollAGroup |
getGroup(java.lang.String groupName) |
int |
getPortNumber() |
int |
getTimeoutValue()
A value for timeout should be defined in the constructor.
|
CollAUser |
getUser(java.lang.String userName) |
java.lang.String |
getUserPassword(java.lang.String userName) |
java.util.Set<java.lang.String> |
getUsersSet() |
void |
setUserPassword(java.lang.String userName,
java.lang.String password)
Sets the user password
|
void |
storeAllServerData()
Performs server data persistence.
|
void |
updateGroup(java.lang.String groupName,
CollAGroup group)
Updates data of a group.
|
void |
updateHost(CollAHost host)
Updates a host data to the server
|
void |
updateUser(CollAUser usr)
Inserts data from an user on the server, updating data for an existing
client or entering data for a new one.
|
int getPortNumber()
int getTimeoutValue()
CollAUser getUser(java.lang.String userName)
userName - name of the userjava.util.Set<java.lang.String> getUsersSet()
void updateHost(CollAHost host)
host - CollAHost to updatevoid updateUser(CollAUser usr)
usr - client to updatevoid storeAllServerData()
throws java.lang.Exception
java.lang.Exceptionvoid setUserPassword(java.lang.String userName,
java.lang.String password)
userName - key to the passwordpassword - the new passwordvoid updateGroup(java.lang.String groupName,
CollAGroup group)
groupName - the name of the group that will be updatedgroup - the group that will be updatedCollAGroup getGroup(java.lang.String groupName)
groupName - name of the group to be located.java.util.Set<java.lang.String> getAllGroups()
long generateSessionID()
void disconnectAllClients()
java.lang.String getUserPassword(java.lang.String userName)
userName - name of the user